package com.hunan.api.catv.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 奖品领取记录表
 * </p>
 *
 * @author jiangzhuan
 * @since 2021-05-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("prize_receive_record")
public class PrizeReceiveRecord extends Model<PrizeReceiveRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 奖品id
     */
    private Integer prizeId;

    /**
     * 领奖用户id
     */
    private Integer memberId;

    /**
     * 领取用户的ip
     */
    private String memberIp;

    /**
     * 领取用户设备mac
     */
    private String memberMac;

    /**
     * 大屏HN账号
     */
    private String accountId;

    /**
     * 逻辑删除 0:已删除 1:未删除
     */
    private Integer deleted;

    /**
     * 领取时间
     */
    private Date receiveTime;

    /**
     * 状态 0:放弃领取 1：领取成功 2：领取失败
     */
    private Integer state;

    /**
     * 领取快照，记录领奖时刻，奖品领奖人信息，json格式
     */
    private String prizeSnapshot;

    /**
     * 活动类型： 1：大小屏账号绑定
     */
    private Integer activityType;


    public static final String ID = "id";

    public static final String PRIZE_ID = "prize_id";

    public static final String MEMBER_ID = "member_id";

    public static final String MEMBER_IP = "member_ip";

    public static final String MEMBER_MAC = "member_mac";

    public static final String ACCOUNT_ID = "account_id";

    public static final String DELETED = "deleted";

    public static final String RECEIVE_TIME = "receive_time";

    public static final String STATE = "state";

    public static final String PRIZE_SNAPSHOT = "prize_snapshot";

    public static final String ACTIVITY_TYPE = "activity_type";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
